// 工单下所有接口
import request from '@/utils/request'

// 工单搜索
export const workSearch = (params) => {
  return request({
    url: `/api/task-service/task/search`,
    params
  })
}
// 工单状态列表  (GET)
export const worKorder = () => {
  return request({
    url: '/api/task-service/task/allTaskStatus'
  })
}

// 创建工单  /api/task-service/task/create
export const getCreatejob = (data) => {
  return request({
    url: '/api/task-service/task/create',
    method: 'POST',
    data
  })
}

// /api/task-service/taskDetails/:taskId
// 补货详情
export const ReplenishmentDetails = (taskId) => {
  return request({
    url: `/api/task-service/taskDetails/${taskId}`
  })
}

// 获取所有工单类型
// /api/task-service/taskType/list
export const WorkOrderType = () => {
  return request({
    url: '/api/task-service/taskType/list'
  })
}

// 获取补货预警值
export const AlertValue = (data) => {
  return request({
    url: '/api/task-service/task/supplyAlertValue',
    data
  })
}
